package messages;

import game.Player;

import java.util.List;


/**
 * MatchStartedMessage
 * 
 * Message sent to inform that a new match will begin.
 */
public class MatchStartedMessage extends Message {

	public MatchStartedMessage(int invitationId, int matchId, List<Player> players, String nextPlayerLogin) {
		super();
	
		this.invitationId = invitationId;
		this.matchId = matchId;
		this.players = players;
		this.nextPlayerLogin = nextPlayerLogin;
	}
		
	
	public int getInvitationId() {
		return this.invitationId;
	}
	

	public int getMatchId() {
		return this.matchId;
	}
	

	public String getNextPlayerLogin() {
		return this.nextPlayerLogin;
	}
	

	public List<Player> getPlayers() {
		return this.players;
	}
	
	
	public String toString() {
		return super.toString() + " " + matchId;
	}
	
	
	private int invitationId;		// The ID of the invitation for this match
	private int matchId;			// Match identifier. Used to identify this specific match.
	private List<Player> players;	// List of participants.
	private String nextPlayerLogin;	// The first to play.

	private static final long serialVersionUID = 1L;
}
